package cn.ahaoweb.drule.core.model;

/**
 * @Name: 规则对象默认配置类
 * @Description:
 * @Author: wangzhonghao
 * @Date: 2025/1/26 13:22
 */
public class RuleModelConfiguration {

    // 默认的父类遍历深度
    public static final int default_super_depth = 1;

    // 默认的子对象遍历深度
    public static final int default_child_depth = 1;

    // 表示未配置，等价于null
    public static final int not_configuration = -1;

    // 空值：null
    public static final String null_value = "null";

    // 是否开启扫描未配置注解的字段
    public static final boolean not_annotated_field_scanning = true;

    // ------------------------------------------------------------------------------------------------------------- //

    // 配置的父类遍历深度
    private static int superDepth = default_super_depth;

    // 配置的子对象遍历深度
    private static int childDepth = default_child_depth;

    // 扫描未配置注解的字段
    private static boolean notAnnotatedField = not_annotated_field_scanning;


    public static final int getSuperDepth() {
        return superDepth;
    }

    public static final void setSuperDepth(int superDepth) {
        RuleModelConfiguration.superDepth = superDepth;
    }

    public static int getChildDepth() {
        return childDepth;
    }

    public static void setChildDepth(int childDepth) {
        RuleModelConfiguration.childDepth = childDepth;
    }

    public static boolean notAnnotatedFieldScanning() {
        return notAnnotatedField;
    }

    public static void setNotAnnotatedFieldScanning(boolean notAnnotatedFieldScanning) {
        RuleModelConfiguration.notAnnotatedField = notAnnotatedFieldScanning;
    }

}
